package com.flong.desgin.patterns.singleresponsibility;

public class SingleResponsibility3 {

    public static void main(String[] args) {
        Vehicle1 vehicle1 = new Vehicle1();
        vehicle1.run("汽车");
        vehicle1.airRun("飞机");
    }
}

class Vehicle1 {

    public void run(String vehicle) {
        System.out.println(vehicle + "在公路上跑");
    }

    public void airRun(String vehicle) {
        System.out.println(vehicle + "在水里上跑");
    }
}

